package cn.stylefeng.guns.modular.business.frequency.orderbonus.mapper;

import cn.stylefeng.guns.modular.business.frequency.orderbonus.model.param.OrderBonusParam;
import cn.stylefeng.guns.modular.business.frequency.orderbonus.model.result.OrderBonusDetail;
import cn.stylefeng.guns.modular.business.frequency.orderbonus.model.result.OrderBonusStatistics;
import cn.stylefeng.guns.modular.business.frequency.orderbonus.model.result.OrderbonusSum;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.orderbonus.entity.OrderBonus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 奖金记录表(activityMq异步处理) Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:16
 */
public interface OrderBonusMapper extends BaseMapper<OrderBonus> {

    List<OrderBonus> getByUserIdsAndMonth(@Param("userIds") List<String> userIds, @Param("month") String month);

    Page<OrderbonusSum> getAppPage(@Param("page") Page<Object> defaultPage, @Param("item") OrderBonusParam orderBonusParam, @Param("userId") Long sysLoginUserId);

    BigDecimal getSiteSum(@Param("userId") Long sysLoginUserId);

    Page<OrderBonusDetail> getAppDetail(@Param("page") Page<Object> defaultPage, @Param("item") OrderBonusParam orderBonusParam, @Param("userId") Long sysLoginUserId);

    OrderBonusStatistics statistics(@Param("item") OrderBonusParam orderBonusParam, @Param("userId") Long sysLoginUserId);
}